<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
<script>
  const a = { name: 'zhangsan' }
  const b = { name: 'lisi' }
  const c = { name: 'wangwu' }
  const d = { name: 'zhaoliu' }

  a.next = b
  b.next = c
  c.next = d

  console.log(a)
  const deleteNode = function (node) {
    node.name = node.next.name // 当前元素(b)的 name 设置为当前元素下一个元素(c)的 name
    node.next = node.next.next // 将当前元素(b)的指针 next 指向当前元素后第二个元素(d)
  }
  deleteNode(b)
  console.log(a)
</script>
